package com.linsir.base;

import com.fasterxml.jackson.databind.ObjectMapper;

import java.io.IOException;
import java.util.Map;

public class SearchPara {

    public static Map<String, String> toMap(String searchParams) throws IOException {

        if (searchParams!=null)
        {
            ObjectMapper objectMapper = new ObjectMapper();
            Map<String,String> map =objectMapper.readValue(searchParams,Map.class);
            return map;
        }
        else
        {
            return null;
        }

    }

}
